INF File Sections

The different sections of an INF file fit together to provide the information used by the setup functions during an installation. The central section that defines the steps of the installation is the Install3AN5O2 section.

The Install3AN5O2 section provides an overview of the installation process. Each line of an Install3AN5O2 section has two parts. On the left of the equals sign (=) is the key. On the right hand side, is a list of one or more section titles. The key specifies the type of the sections that are listed on the right.

To better understand this, consider the following example of an Install section.

[MyInstallSection]

Copyfiles=DataFiles, ProgramFiles

Delfiles=OldFiles

UpdateInis=NewIniInfo

AddReg=NewRegistryInfo, MoreNewRegistryInfo

DelReg=OldRegistryInfo, MoreOldRegistryInfo

 

In the preceding example, the CopyFiles key is given the values DataFiles and ProgramFiles. These specify two Copy Files94WX0. sections in the INF file that contain the source filenames for the copying operations necessary for the installation. You can specify one or more Copy Files94WX0. sections for the CopyFiles key of an Install3AN5O2 section.

Simliarly, the Delfiles key specifies Delete Files.O07.L sections that contain information relevant to file deletion operations. The UpdateInis key specifies Update INI FileCG5TFA sections that contain information about updating entries in the INI file, and the AddReg and DelReg keys specify Add Registry16DRHS6 and Delete RegistryEH0E93 sections that contain information about adding or deleteing registry information.

For more information about the types of sections that can be specified in an Install3AN5O2 section, see the INF File Format ReferenceL61DAW.

The DestinationDirsWKMUVK section defines the target directory for files listed in Copy Files94WX0., Rename Files2LKG_AQ, or Delete Files.O07.L sections.

The SourceDisksNames8OLI7ZO section assigns an ordinal value to each source disk. You can store additional information about the source disks, such as a human-readable description in this section.

The SourceDisksFiles3.PG0KP section maps the source files to the ordinal values assigned in the SourceDisksNames section.

You can have multiple platform-specific SourceDisksNames8OLI7ZO and SourceDisksFiles3.PG0KP sections in an INF file. You add a platform-specific suffix to the title of a SourceDisksNames or SourceDisksFiles section to indicate that the information listed in that section is platform-specific.

If the setup functions find platform-specific SourceDisksNames and SourceDisksFiles sections that match the user s platform, the setup functions use the platform-specific sections. Otherwise the setup functions use the default (non-suffixed) SourceDisksNames and SourceDisksFiles sections.

For example, consider the following sections from an INF file.

[SourceDisksNames]

1= NT CD , \default

 

[SourceDisksNames.mips]

1= NT CD , \mips

 

[SourceDisksNames.alpha]

1= NT CD , \alpha

 

If the user s machine was a MIPS-based system, the setup functions use the information listed in the section titled SourceDisksNames.mips and look for source files in the \mips directory of the specified source media.

For an Intel-based system, no platform-specific section exists, and the setup functions use the information listed in SourceDisksNames and look for source files in the \default directory.

The Strings22R4H3P section maps strings keys, values used as place-holders in an INF file and enclosed by percent signs (%), to the printable strings they represent. You can use strings keys as placeholders in an INF file for information that changes frequently or needs to be localized.